package com.bgamq.atcrowd.mapper;

import com.bgamq.atcrowd.entity.Role;
import com.bgamq.atcrowd.entity.RoleExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author admin
 */
public interface RoleMapper {
    /**
     * 统计
     * @param example
     * @return 统计和
     */
    int countByExample(RoleExample example);

    /**
     * 删除
     * @param example
     * @return 条件删除
     */
    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectRoleByKeyword(String keyword);

    List<Role> selectAssignedRole(Integer adminId);

    List<Role> selectUnAssignedRole(Integer adminId);
}